package com.geekhome.znxz.cucumber.chapter1;

import cucumber.api.PendingException;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

/**
 * Copyright © 2019年 znxz. All rights reserved.
 *
 * @author 临江仙 hzqiuxm@163.com
 * Scentrio Outline
 * @date 2019/5/23 10:32
 */
public class ScentioOutimeStepdefs {


    @Given("^进行用户登录来测试Scentrio Outline$")
    public void 进行用户登录来测试scentrioOutline() throws Throwable {
        // Write code here that turns the phrase above into concrete actions
        System.out.println("进行用户登录来测试Scentrio Outline");
    }

    @When("^使用错误用户名 \"([^\"]*)\" 和密码 \"([^\"]*)\" 来登录$")
    public void 使用错误用户名和密码来登录(String userName, String password) throws Throwable {
        // Write code here that turns the phrase above into concrete actions
        System.out.println(userName);
        System.out.println(password);
    }

    @Then("^不正确的用户名或密码$")
    public void 不正确的用户名或密码() throws Throwable {
        // Write code here that turns the phrase above into concrete actions
        System.out.println("不正确的用户名或密码");
    }

    @When("^使用正确用户名 \"([^\"]*)\", 密码 \"([^\"]*)\" 来登录$")
    public void 使用正确用户名密码来登录(String userName, String password) throws Throwable {
        // Write code here that turns the phrase above into concrete actions
        System.out.println(userName);
        System.out.println(password);
    }

    @Then("^用户名密码正确，登录成功$")
    public void 用户名密码正确登录成功() throws Throwable {
        // Write code here that turns the phrase above into concrete actions
        System.out.println("用户名密码正确，登录成功");
    }
}
